package com.xs.demo.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import com.xs.demo.entity.Userinfo;
import com.xs.demo.service.ExportExcel;
import com.xs.demo.service.UserService;

@Controller
@RequestMapping(value="/inputexcel")
public class InputExcelController {
	ExportExcel exportExcel;
	UserService userService;
	
	@RequestMapping(value="/upload",method = RequestMethod.POST)
	public String upload(@RequestParam MultipartFile file) throws Exception {
//		List<Userinfo> list = exportExcel.importExcel(file.getInputStream());
//		userService.insertuserinfo(list);
				return "";
	}
	public ExportExcel getExportExcel() {
		return exportExcel;
	}
	public void setExportExcel(ExportExcel exportExcel) {
		this.exportExcel = exportExcel;
	}
	
}
